package com.ihr360.sharedservice.exceptionmail.controller;


import com.ihr360.shared.exceptionmail.entity.ExceptionRecord;
import com.ihr360.sharedservice.exceptionmail.service.ExceptionMailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Eric on 2018/6/7/007.
 */
@RestController
@RequestMapping(value = "/exception/mail")
public class ExceptionMailController {

    @Autowired
    private ExceptionMailService exceptionMailService;

    @PostMapping(value = "/send", produces = MediaType.APPLICATION_JSON_VALUE)
    public void send(@RequestBody ExceptionRecord record) {
        exceptionMailService.send(record);
    }

}
